require 'net/http'

url = ARGV[0]
begin
  http_conn = Net::HTTP.new(url, 80)
  resp, data = http_conn.head('/', nil)    
  if resp.code == '200' 
    resp.each {|key, value|
      (puts 'The server at ' + url + ' is ' + value) if key == 'server'    
    }
  end
end

  